<?php
abstract class a_model2data_converter extends stdClass{
    public function __construct(stdClass $data){
        $this->make_properties($data);
    }

    protected function make_properties(stdClass $data){
        foreach(get_object_vars($data) as $k=>$v){
            $this->$k = $v;
        }
    }
}
?>